import request from '@/utils/request'

// 创建线路模板—行程
export function createLineTrip(data) {
  return request({
    url: '/team/line-trip/create',
    method: 'post',
    data: data
  })
}

// 更新线路模板—行程
export function updateLineTrip(data) {
  return request({
    url: '/team/line-trip/update',
    method: 'put',
    data: data
  })
}
// 批量更新添加线路模板—行程
export function createUpdateBatchLineTrip(data) {
  return request({
    url: '/team/line-trip/createUpdateBatch',
    method: 'put',
    data: data
  })
}

// 删除线路模板—行程
export function deleteLineTrip(id) {
  return request({
    url: '/team/line-trip/delete?id=' + id,
    method: 'delete'
  })
}

/** 批量删除线路模板—行程 */
export function deleteLineTripList(ids) {
  return request({
    url: `/team/line-trip/delete-list?ids=${ids.join(',')}`,
    method: 'delete'
  })
}

// 获得线路模板—行程
export function getLineTrip(id) {
  return request({
    url: '/team/line-trip/get?id=' + id,
    method: 'get'
  })
}

// 获得线路模板—行程分页
export function getLineTripPage(params) {
  return request({
    url: '/team/line-trip/page',
    method: 'get',
    params
  })
}
// 导出线路模板—行程 Excel
export function exportLineTripExcel(params) {
  return request({
    url: '/team/line-trip/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}